import request from './axios'

// get 请求
export const requestGet = async <T>(url: string): Promise<T | null> => {
  const data = await request<unknown, T>({ url, method: 'get' })
  return data
}

// post 请求
export const requestPost = async <T>(url: string, param: unknown): Promise<T | null> => {
  const data = await request<unknown, T>({ url, method: 'post', data: param })
  return data
}
